<?php

namespace CMS\User\Models;
/**
 * Trida entity pro tabulku operaci. 
 *
 * @author David Dusek
 */
use Doctrine\ORM\Mapping as ORM;

/** 
 * @ORM\Entity(repositoryClass="\CMS\User\Models\OperationRepository")
 * @ORM\Table(name="user_operation")
 */
class Operation extends \Nette\Object {
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue
     * @var int 
     */
    private $id;

    /**
     * @ORM\Column(type="string", length=100)
     * @var string 
     */
    private $title;
    
    /**
     * @ORM\Column(type="string", length=100)
     * @var string 
     */
    private $value;
    
    /**
     * @ORM\ManyToOne(targetEntity="\CMS\User\Models\Resource", inversedBy="operations")
     * @ORM\joinColumn(name="resource_id", referencedColumnName="id")
     */
    private $resource;
    
    public function getId() {
        return $this->id;
    }
    
    public function setTitle($title) {
        $this->title = $title; 
    }

    public function getTitle() {
        return $this->title;
    }

    public function setValue($value) {
        $this->value = $value; 
    }

    public function getValue() {
        return $this->value;
    }

    public function setResource(Resource $resource) {
        $this->resource = $resource; 
    }

    public function getResource() {
        return $this->resource;
    }

}
